package cn.hnbjx.prepaid.common;

public class BusinessException extends RuntimeException {

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public BusinessException() {
    }

    public BusinessException(BusinessStatus status) {
        super(status.getMessage());
        this.code = status.getCode();
    }

    public BusinessException(BusinessStatus status, String message) {
        super(message);
        this.code = status.getCode();
    }
}